home *** CD-ROM | disk | FTP | other *** search
/ Aircraft Imagery / Aircraft Imagery.iso / autorun / prdi.~pa < prev    next >
Text File  |  1996-03-13  |  1KB  |  72 lines

  1. unit Prdi;
  2.  
  3. interface
  4.  
  5. uses WinTypes, WinProcs, Classes, Graphics, Forms, Controls, Buttons,
  6.   StdCtrls, ExtCtrls,Printers;
  7.  
  8. type
  9.   TpriDial = class(TForm)
  10.     OKBtn: TBitBtn;
  11.     CancelBtn: TBitBtn;
  12.     Bevel1: TBevel;
  13.     c1: TRadioButton;
  14.     c2: TRadioButton;
  15.     c3: TRadioButton;
  16.     Label1: TLabel;
  17.     procedure CancelBtnClick(Sender: TObject);
  18.     procedure OKBtnClick(Sender: TObject);
  19.   private
  20.     { Private declarations }
  21.   public
  22.     { Public declarations }
  23.   end;
  24.  
  25. var
  26.   priDial: TpriDial;
  27.  
  28. implementation
  29.  
  30. {$R *.DFM}
  31.  
  32. procedure TpriDial.CancelBtnClick(Sender: TObject);
  33. begin
  34. close;
  35. end;
  36.  
  37. procedure TpriDial.OKBtnClick(Sender: TObject);
  38. var
  39.    f,myfile:Textfile;
  40.    str:String;
  41.    col,i:integer;
  42. begin
  43.      col:=10;
  44.      if c1.checked then col:=1;
  45.      if c2.checked then col:=2;
  46.      if c3.checked then col:=3;
  47.      if col<>10 then
  48.      begin
  49.      AssignFile(f,'c:\temp.ben');
  50.      Reset(f);
  51.      AssignPrn(MyFile);
  52.      Rewrite(MyFile);
  53.      writeln(myfile,' ');
  54.      While not Eof(f) do
  55.      begin
  56.      for i:=1 to col do
  57.      begin
  58.      try
  59.      readln(f,str);
  60.      Write(MyFile, str:20);
  61.      finally
  62.      end;
  63.      end;
  64.      writeln(Myfile);
  65.      end;
  66.      closefile(f);
  67.      System.CloseFile(MyFile);
  68.      end;
  69. end;
  70.  
  71. end.
  72.